require("../css/login.less")
require("../fonts/iconfont.css")
first()//头部轮播图
function first(){
    let trest = document.querySelectorAll(".trest")
let dot11 = document.querySelectorAll(".dot11")
for (let i = 0; i < trest.length; i++) {
    dot11[i].addEventListener("mouseenter", function () {
        for (let a = 0; a < trest.length; a++) {
            dot11[a].classList.remove("dot22")
            trest[a].classList.remove("trest11")
        }
        dot11[i].classList.add("dot22")
        trest[i].classList.add("trest11")
        index = i
    })
}
let index = 0
window.setInterval(function () {
    index++;
    if (index > 1) {
        index = 0
    }
    for (let j = 0; j < trest.length; j++) {
        dot11[j].classList.remove("dot22")
        trest[j].classList.remove("trest11")
    }
    dot11[index].classList.add("dot22")
    trest[index].classList.add("trest11")
}, 1000)
}
